FROM openjdk

ENV javaOps ""
ENV LOG_HOME /data/logs
RUN mkdir -p "$LOG_HOME"
# 工作目录
WORKDIR /opt/leetcode

# 拷贝jar到容器之中
ADD LeetCode-1.0-SNAPSHOT.jar /opt/leetcode/app.jar
# docker 日志文件处理
VOLUME "${LOG_HOME}"

# 暴露端口
EXPOSE 8080

ENTRYPOINT ["java", "-jar", "/opt/leetcode/app.jar", "${javaOps}"]